﻿using System;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace Universe.WCF.Behaviors.Test
{
    [TransparentDeliveryBehavior]
    [ServiceContract(Namespace = "mytest", Name = "Service1")]
    public interface IService1<T>
    {
        [TransparentDeliveryBehavior]
        [NetDataContractFormat]
        [OperationContract]
        string GetData(int value, Type type);

        [OperationContract(Name = "GetData(CT)")]
        CompositeType GetData(CompositeType composite);

        [OperationContract]
        void ThrowException(string message);

    }

    [TransparentDeliveryBehavior]
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }


    }
}